package service

import (
	"boy-go/modules/generator/model"
	"boy-go/modules/generator/vo"
)

type GenTableService interface {
	GetById(tableId int64) (*vo.GenTableModel, error)
	List(req *vo.QueryGenTableReq) (*vo.ListGenTableRsp, error)
	SelectGenTableAll() []*vo.GenTableModel
	Add(req *vo.AddGenTableReq) (*vo.AddGenTableRsp, error)
	Edit(req *vo.EditGenTableReq) (*vo.EditGenTableRsp, error)
	Del(tableId int64) error
	BatchDel(ids []string) error
	SelectDbTableList(query *vo.QueryGenTableReq) (*vo.ListGenTableRsp, error)
	SelectDbTableListByNames(tables []string) ([]*model.GenTable, error)
	ImportGenTable(tableList []*model.GenTable, operName string) error //导入表结构
	SynchDb(tableName string) error                                    // 同步数据库
	PreviewCode(tableId int64) ([]*vo.TemplatePreviewCode, error)      //预览代码
	ValidateEdit(req *vo.EditGenTableReq) error                        //修改保存参数校验
	DownloadCode(tableNames []string) ([]byte, error)
}
